3.1308 \(\int (a+b \tan (e+f x))^m \, dx\)

Optimal. Leaf size=167 \[ \frac {b (a+b \tan (e+f x))^{m+1} \, _2F_1\left (1,m+1;m+2;\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}}\right )}{2 \sqrt {-b^2} f (m+1) \left (a-\sqrt {-b^2}\right )}-\frac {b (a+b \tan (e+f x))^{m+1} \, _2F_1\left (1,m+1;m+2;\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right )}{2 \sqrt {-b^2} f (m+1) \left (a+\sqrt {-b^2}\right )} \]

[Out]

1/2*b*hypergeom([1, 1+m],[2+m],(a+b*tan(f*x+e))/(a-(-b^2)^(1/2)))*(a+b*tan(f*x+e))^(1+m)/f/(1+m)/(a-(-b^2)^(1/
2))/(-b^2)^(1/2)-1/2*b*hypergeom([1, 1+m],[2+m],(a+b*tan(f*x+e))/(a+(-b^2)^(1/2)))*(a+b*tan(f*x+e))^(1+m)/f/(1
+m)/(-b^2)^(1/2)/(a+(-b^2)^(1/2))

________________________________________________________________________________________

Rubi [A]  time = 0.25, antiderivative size = 167, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3485, 712, 68} \[ \frac {b (a+b \tan (e+f x))^{m+1} \, _2F_1\left (1,m+1;m+2;\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}}\right )}{2 \sqrt {-b^2} f (m+1) \left (a-\sqrt {-b^2}\right )}-\frac {b (a+b \tan (e+f x))^{m+1} \, _2F_1\left (1,m+1;m+2;\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right )}{2 \sqrt {-b^2} f (m+1) \left (a+\sqrt {-b^2}\right )} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Tan[e + f*x])^m,x]

[Out]

(b*Hypergeometric2F1[1, 1 + m, 2 + m, (a + b*Tan[e + f*x])/(a - Sqrt[-b^2])]*(a + b*Tan[e + f*x])^(1 + m))/(2*
Sqrt[-b^2]*(a - Sqrt[-b^2])*f*(1 + m)) - (b*Hypergeometric2F1[1, 1 + m, 2 + m, (a + b*Tan[e + f*x])/(a + Sqrt[
-b^2])]*(a + b*Tan[e + f*x])^(1 + m))/(2*Sqrt[-b^2]*(a + Sqrt[-b^2])*f*(1 + m))

Rule 68

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((b*c - a*d)^n*(a + b*x)^(m + 1)*Hype
rgeometric2F1[-n, m + 1, m + 2, -((d*(a + b*x))/(b*c - a*d))])/(b^(n + 1)*(m + 1)), x] /; FreeQ[{a, b, c, d, m
}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] && IntegerQ[n]

Rule 712

Int[((d_) + (e_.)*(x_))^(m_)/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m, 1/(a + c*x^2
), x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] &&  !IntegerQ[m]

Rule 3485

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Dist[b/d, Subst[Int[(a + x)^n/(b^2 + x^2), x], x
, b*Tan[c + d*x]], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[a^2 + b^2, 0]

Rubi steps

\begin {align*} \int (a+b \tan (e+f x))^m \, dx &=\frac {b \operatorname {Subst}\left (\int \frac {(a+x)^m}{b^2+x^2} \, dx,x,b \tan (e+f x)\right )}{f}\\ &=\frac {b \operatorname {Subst}\left (\int \left (\frac {\sqrt {-b^2} (a+x)^m}{2 b^2 \left (\sqrt {-b^2}-x\right )}+\frac {\sqrt {-b^2} (a+x)^m}{2 b^2 \left (\sqrt {-b^2}+x\right )}\right ) \, dx,x,b \tan (e+f x)\right )}{f}\\ &=-\frac {b \operatorname {Subst}\left (\int \frac {(a+x)^m}{\sqrt {-b^2}-x} \, dx,x,b \tan (e+f x)\right )}{2 \sqrt {-b^2} f}-\frac {b \operatorname {Subst}\left (\int \frac {(a+x)^m}{\sqrt {-b^2}+x} \, dx,x,b \tan (e+f x)\right )}{2 \sqrt {-b^2} f}\\ &=\frac {b \, _2F_1\left (1,1+m;2+m;\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}}\right ) (a+b \tan (e+f x))^{1+m}}{2 \sqrt {-b^2} \left (a-\sqrt {-b^2}\right ) f (1+m)}-\frac {b \, _2F_1\left (1,1+m;2+m;\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right ) (a+b \tan (e+f x))^{1+m}}{2 \sqrt {-b^2} \left (a+\sqrt {-b^2}\right ) f (1+m)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.16, size = 118, normalized size = 0.71 \[ \frac {(a+b \tan (e+f x))^{m+1} \left ((a+i b) \, _2F_1\left (1,m+1;m+2;\frac {a+b \tan (e+f x)}{a-i b}\right )-(a-i b) \, _2F_1\left (1,m+1;m+2;\frac {a+b \tan (e+f x)}{a+i b}\right )\right )}{2 f (m+1) (a+i b) (b+i a)} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Tan[e + f*x])^m,x]

[Out]

(((a + I*b)*Hypergeometric2F1[1, 1 + m, 2 + m, (a + b*Tan[e + f*x])/(a - I*b)] - (a - I*b)*Hypergeometric2F1[1
, 1 + m, 2 + m, (a + b*Tan[e + f*x])/(a + I*b)])*(a + b*Tan[e + f*x])^(1 + m))/(2*(a + I*b)*(I*a + b)*f*(1 + m
))

________________________________________________________________________________________

fricas [F]  time = 0.63, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (b \tan \left (f x + e\right ) + a\right )}^{m}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))^m,x, algorithm="fricas")

[Out]

integral((b*tan(f*x + e) + a)^m, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \tan \left (f x + e\right ) + a\right )}^{m}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))^m,x, algorithm="giac")

[Out]

integrate((b*tan(f*x + e) + a)^m, x)

________________________________________________________________________________________

maple [F]  time = 0.70, size = 0, normalized size = 0.00 \[ \int \left (a +b \tan \left (f x +e \right )\right )^{m}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*tan(f*x+e))^m,x)

[Out]

int((a+b*tan(f*x+e))^m,x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \tan \left (f x + e\right ) + a\right )}^{m}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))^m,x, algorithm="maxima")

[Out]

integrate((b*tan(f*x + e) + a)^m, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int {\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )}^m \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*tan(e + f*x))^m,x)

[Out]

int((a + b*tan(e + f*x))^m, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \tan {\left (e + f x \right )}\right )^{m}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))**m,x)

[Out]

Integral((a + b*tan(e + f*x))**m, x)

________________________________________________________________________________________